In the field of information processing technologies, certain data configurations are needed during management of devices or services, for example, a configuration of information such as information of a physical infrastructure, a logical structure, and a service. Specifically, configuration data may be used to describe a real configuration item in the form of a record. For example, in a relational database, a table is created for a device board to manage configuration data of the board.
Data configuration rollback is an important function, and mainly means that: after a data configuration operation is performed, newly configured data is verified; if the newly configured data is found to be incorrect, the data configuration needs to be rolled back to previously configured data; and if the newly configured data is correct, implementation of the newly configured data is confirmed.
An existing data configuration includes: when a configuration operation is started, backing up current configuration data to form data in an active state and data in a standby state; after the data in the active state is configured for several times, if a data configuration needs to be rolled back, switching states of the data configured and the data not configured, so that the data in the active state is the data not configured; and if the newly configured data is correct, deleting the data not configured. However, this method requires that the current configuration data should be backed up. Therefore, requirements for storage space are increased, and single-step rollback can be hardly supported.
In another data configuration method, there is no need to back up configuration data, and therefore, requirements for storage space are lowered, and single-step rollback can be supported. Specifically, during each data configuration operation, a reverse operation is formed for the data configuration operation. If a data configuration needs to be rolled back, the rollback function can be implemented by performing the reverse operation. Because some data configuration operations in a specific data configuration process are complex, an algorithm for generating reverse operations is complex; furthermore, because there are many data configuration operations, all of which require that the corresponding reverse operations should be performed during rollback, the rollback takes a long time, that is, the rollback rate is low.